﻿Public Class Agores

    Private Sub AgoresBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AgoresBindingNavigatorSaveItem.Click
        If (ID_PromitheutiTextBox.Text = "") Then
            Me.ErrorProvider1.SetError(ID_PromitheutiTextBox, "Πρέπει να δώσεις ID Προμηθευτή")
        Else
            Me.Validate()
            Me.AgoresBindingSource.EndEdit()
            Me.TableAdapterManager.UpdateAll(Me.PanalogDataSet)
        End If
    End Sub

    Private Sub Agores_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Label1.Visible = False
        PerigrafiComboBox.Visible = False
        eisagogi.Visible = False
        posotitaTextBox.Visible = False
        Label2.Visible = False
        'TODO: This line of code loads data into the 'PanalogDataSet.Proionta' table. You can move, or remove it, as needed.
        Me.ProiontaTableAdapter.Fill(Me.PanalogDataSet.Proionta)
        'TODO: This line of code loads data into the 'PanalogDataSet.Agores' table. You can move, or remove it, as needed.
        Me.AgoresTableAdapter.Fill(Me.PanalogDataSet.Agores)
    End Sub


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles proiontaAgoras.Click
        GroupBox1.Visible = True
        Me.Prointa_AgoronTableAdapter.FillProiontaAgoras(Me.PanalogDataSet.Prointa_Agoron, IDTextBox.Text)
    End Sub

    Private Sub BindingNavigatorMoveNextItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorMoveNextItem.Click
        GroupBox1.Visible = False
    End Sub

    Private Sub BindingNavigatorMovePreviousItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorMovePreviousItem.Click
        GroupBox1.Visible = False
    End Sub

    Private Sub BindingNavigatorAddNewItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorAddNewItem.Click
        GroupBox1.Visible = False
        Label1.Visible = True
        PerigrafiComboBox.Visible = True
        proiontaAgoras.Visible = False
        ektuposiAgoron.Visible = False
        IDTextBox.Visible = False
        posotitaTextBox.Visible = True
        Label2.Visible = True

        If Not (My.Computer.Keyboard.NumLock) And My.Computer.Keyboard.CapsLock Then
            MsgBox("Προσοχή το Num Lock είναι απενεργοποιημένο και το Caps Lock ενεργοποιημένο.")
        ElseIf Not My.Computer.Keyboard.NumLock Then
            MsgBox("Προσοχή το Num Lock είναι απενεργοποιημένο.")
        ElseIf My.Computer.Keyboard.CapsLock Then
            MsgBox("Προσοχή το Caps Lock είναι ενεργοποιημένο.")
        End If
    End Sub

    Private Sub BindingNavigatorMoveLastItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorMoveLastItem.Click
        GroupBox1.Visible = False
    End Sub

    Private Sub BindingNavigatorMoveFirstItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorMoveFirstItem.Click
        GroupBox1.Visible = False
    End Sub

    Private Sub ProiontaDataGridView_CellMouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs)

    End Sub

End Class